package org.jackysoft.service;

import java.util.Collection;

import org.jackysoft.data.IDataProvider;
import org.jackysoft.entity.AcegiRole;
import org.jackysoft.entity.TreeNode;
import org.springframework.dao.DataAccessException;

public interface TreeNodeService extends IDataProvider<String,TreeNode> {

		
	Collection<TreeNode> getChildrenLogined(String id) throws DataAccessException;
	
	Collection<TreeNode> getChildren(String id) throws DataAccessException;

	Collection<TreeNode> getChildren(String id,String acegi) throws DataAccessException;

	Collection<TreeNode> getChildren(AcegiRole secRole) throws DataAccessException;
	
	
	TreeNode[] getPath(String id);
	
	TreeNode get(int lft,int rgt);
	
	int getDepth(String id);
	TreeNode[] getChildDepths(String id);
	Collection<TreeNode> getAllChildren(String id);
	/**
	 * 批量更新树的排序号
	 */
	void saveSorted(Collection<TreeNode> trees) throws DataAccessException;

}
